﻿@using GSLMS.Entity
@using GSLMS.Entity.Enum
@model GSLMS.Entity.TB_LOAN_MAIN
@{
    Layout = null;
    var ddlFinalApprover = ViewData["FinalApprover"] as SelectList;
    Model.ProFeesFree = Model.ProFeesFree ?? new TB_COL_FEESFREE();
    var isLastAuditUser = (int)ViewData["LastAuditUser"];
}
<div class="pageContent" layouth="5">
    <form method="post" id="formGFeesFree" action="DianDang/BMAudit/bManager/GLoanExt?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone)">
    <div class="pageFormContent" layouth="350">
        @Html.HiddenFor(model => model.ID)
        <p>
            <label>
                客户名称:</label>@Html.ValueFor(model => model.CUSTNAME)</p>
        <p>
            <label>
                证件号码:</label>@Html.ValueFor(model => model.CUSTNO)</p>
        <p>
            <label>
                申请编号:</label>@Html.ValueFor(model => model.APPLYNO)</p>
        <p>
            <label>
                贷款号:</label>@Html.ValueFor(model => model.LOANNO)</p>
        <p>
            <label>
                贷款产品:</label>@Html.ValueFor(model => model.PRODUCTNAME)</p>
        <p>
            <label>
                放款金额:</label>@Html.ValueFor(model => model.ACTAMT)</p>
        <p>
            <label>
                放款日期:</label>@Html.ValueFor(model => model.LOANDATE)</p>
        <p>
            <label>
                贷款期限:</label>@Html.ValueFor(model => model.LOANPHASE) @(Model.LOANPHASETYPE == 0 ? "天" : "月")</p>
        <p>
            <label>
                到期日期:</label>@Html.ValueFor(model => model.ENDDATE)</p>
        <p>
            <label>
                贷款利率:</label>@Html.ValueFor(model => model.RATE)</p>
        <p>
            <label>
                管理费率:</label>@Html.ValueFor(model => model)</p>
        <p>
            <label>
                综合费率:</label>@Html.ValueFor(model => model)</p>
        <p>
            <label>
                还款方式:</label>@((ApplyEnum.ProRepayment)Model.LOANPAYMENT)</p>
        <p>
            <label>
                已还利息合计:</label>@Html.ValueFor(model => model.ProFeesFree.ACTINT)</p>
        <p>
            <label>
                已还管理费合计:</label>@Html.ValueFor(model => model.ProFeesFree.ACTMANAGE)</p>
        <p>
            <label>
                已还本金合计:</label>@Html.ValueFor(model => model.ProFeesFree.ACTCAPITAL)</p>
        <p>
            <label>
                结欠本金:</label>@Html.ValueFor(model => model.ProFeesFree.LEFTCAPITAL)</p>
        <p>
            <label>
                <a href="" target="dialog" rel="Return" title="还款明细">还款明细</a>
            </label>
        </p>
        <div class="title">
            <h4>
                费用减免栏</h4>
            <p>
                <label>
                    客户承诺还款日期:</label>@Html.ValueFor(model => model.ProFeesFree.ACCPAYDATE)</p>
            <p>
                <label>
                    应还本金:</label>@Html.ValueFor(model => model.LoanReturn.SHOULDCAPITAL)</p>
            <p>
                <label>
                    应还利息:</label>@Html.ValueFor(model => model.LoanReturn.SHOULDINT)</p>
            <p>
                <label>
                    应还管理费:</label>@Html.ValueFor(model => model.LoanReturn.SHOULDCOST)</p>
            <p>
                <label>
                    应还逾期利息:</label>@Html.ValueFor(model => model.LoanReturn.SHOULDDELAYINT)</p>
            <p>
                <label>
                    应还合计:</label>@Html.ValueFor(model => model.LoanReturn.TOTALSHOULD)</p>
            <p>
                <label>
                    减免所有应还逾期利息:</label>@Html.ValueFor(model => model.ProFeesFree.REDDELAYINT)</p>
            <p>
                <label>
                    结欠本金:</label>@Html.ValueFor(model => model.ProFeesFree.LEFTCAPITAL)</p>
            <p>
                <label>
                    合计减免:</label>@Html.ValueFor(model => model.ProFeesFree.TOTALREDUCE)</p>
        </div>
        <p style="width: 95%">
            <label>
                备注：</label>
            @Html.ValueFor(model => model.ProFeesFree.REMARK)
        </p>
        <p>
            <label>
                申请日期：</label>
            @Html.ValueFor(model => model.ProFeesFree.APPLYDATE)
        </p>
        <p>
            <label>
                申请人：</label>
            @Html.ValueFor(model => model.ProFeesFree.APPLYBY)
        </p>
        <p>
            <label>
                审批日期:</label>@Html.ValueFor(model => model.CONFIRMDATE)</p>
        <p>
            <label>
                审批人:</label>@Html.ValueFor(model => model.CONFIRMBY)</p>
        <p style="width: 95%">
            <label>
                意见：</label>
            @Html.TextArea("Remark", new { style = "width:100%;height:60px" })
           
        </p>
        <p style="display:@(isLastAuditUser==1?"none":"inline");">
            <label>
                提交到：</label>
            @Html.DropDownList("toUser", ddlFinalApprover, new { @class = "combox" })
            @Html.Hidden("hidActiondo");
        </p>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GFeesFree(1)">
                            同意</button></div>
                </div>
            </li>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GFeesFree(2)">
                            拒绝</button></div>
                </div>
            </li>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GFeesFree(3)">
                            退回</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
<script>
    function GFeesFree(action) {
        $form = $("#formGFeesFree");
        $("#hidActiondo", $form).val(action);
        if (action > 0) {
            var Remark = $("#Remark", $form).val();
            if (Remark)
            { validateCallback($form, dialogAjaxDone); }
            else {
                alertMsg.error("请输入意见!");
            }
        }
        else {
            validateCallback($form, dialogAjaxDone);
        }
    }
</script>
